@extends('admin.layout')
@section('body')
    <!-- 正文开始 -->
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-body">
                <table id="adminTable" lay-filter="adminTable"></table>
            </div>
        </div>
    </div>
@stop
@push('script')
    <script type="text/javascript">
        layui.use(['layer', 'form', 'table', 'util', 'admin'], function () {
            //加载完成
            var listTableInc = new ListTable("{{admin_url($baseRoute.'pager')}}");
            @auth('receive')
            listTableInc.confirmBar('<button type="button" class="layui-btn layui-btn-xs">领取</button>', '确认要领取吗？', (tb, d) => {
                return SystemUtil.ajax("{{admin_url($baseRoute.'receive')}}").setData({id: d.id});
            });
            @endauth
            listTableInc.lineNumber();
            listTableInc.column("预约号", "id").setWidth(100);
            listTableInc.column("姓名", "name"); 
            listTableInc.column("性别", "gender_text").setWidth(60);
            listTableInc.column("年龄", "age").setWidth(60);
            listTableInc.column("相关病种", "diseases");
            listTableInc.column("区域", "area_name");
            listTableInc.column("咨询员", "custom_service_name");
            listTableInc.column("登记时间", "created_at").setWithDateTime();
            listTableInc.rowBarWidth = 70;
            listTableInc.render();
        });
    </script>
@endpush
